package com.ly.heart.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ly.heart.domain.CustomerEntity;
import com.ly.heart.domain.dto.CustomerQueryDto;
import com.ly.heart.domain.vo.CustomerVo;

/**
 * 客户Mapper接口
 * @author cxl
 * @date 2024-05-14
 */
public interface CustomerMapper extends BaseMapper<CustomerEntity> {
    /**
     * 查询客户
     * @param id 客户主键
     * @return 客户
     */
    CustomerEntity selectCustomerEntityById (String id);

    /**
     * 查询客户列表
     * @param customerEntity 客户
     * @return 客户集合
     */
    IPage<CustomerVo> selectCustomerEntityList (CustomerQueryDto customerQueryDto);

    /**
     * 新增客户
     * @param customerEntity 客户
     * @return 结果
     */
    int insertCustomerEntity (CustomerEntity customerEntity);

    /**
     * 修改客户
     * @param customerEntity 客户
     * @return 结果
     */
    int updateCustomerEntity (CustomerEntity customerEntity);

    /**
     * 删除客户
     * @param id 客户主键
     * @return 结果
     */
    int deleteCustomerEntityById (String id);

    /**
     * 批量删除客户
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    int deleteCustomerEntityByIds (String[] ids);
}
